/**
 * @Title: PQuery.java
 * @Package com.charging.model.result
 * @Description: TODO(用一句话描述该文件做什么)
 * @author ZKzha
 * @date 2019年8月14日 下午8:58:06
 * @version V1.0
 */
package com.bogo.dbtable.modelVo.result;

import java.io.Serializable;

/**
 * @author ZKzha
 * @date 2019-08-14 20:58
 * 分页查询
 */
public class PQuery implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private int page;

    private int rows;

    public int getPage() {
        if (page == 0)
            return 1;
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        if (rows == 0)
            return 10;
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public int getStartPage() {
        return (getPage() - 1) * getRows();
    }

}
